package com.example.baijiebrower.tools;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class NavigationBar {
    public void Hide(){
        try {
            Process process = Runtime.getRuntime().exec(" settings put global policy_control immersive.full=* ");
            // 读取命令输出
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }
        } catch (Exception e){
            e.printStackTrace();
        }
    }

    public void show(){
        try {
            Process process = Runtime.getRuntime().exec(" settings put global policy_control null ");
            // 读取命令输出
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }
        } catch (Exception e){
            e.printStackTrace();
        }
    }
}
